Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

joi-of-cql

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joi-of-cql

Create cql type definitions from joi schema validations

  • 2.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

joi-of-cql

Create cql type definitions from joi schema validations

Usage

var joc = require('joi-of-cql');

apollo.define('car', {
  schema: joc.object({
    car_id: joc.cql.uuid(),
    manufacturer_id: joc.cql.uuid(),
    drivers: joc.set(joc.cql.uuid())
  }).partitionKey('car_id')
    .clusteringKey('manufacturer_id')
CQL Data TypeValidation Type
asciicql.ascii()
bigintcql.bigint()
blobcql.blob()
booleancql.boolean()
countercql.counter()
decimalcql.decimal()
doublecql.double()
floatcql.float()
inetcql.inet()
textcql.text()
timestampcql.timestamp()
timeuuidcql.timeuuid()
uuidcql.uuid()
varcharcql.varchar()
varintcql.varint()
mapcql.map(cql.text(), cql.text()),
setcql.set(cql.text())

Extensions to Joi.Object

  • .partitionKey(key) - key can be an array or a single string identifying one or more of the properties in the schema as a partition key.
  • .partitionKey() - retrieve the previously defined partition key.
  • .clusteringKey(key) - key can be an array or a single string identifying one or more of the properties in the schema as a clustering key.
  • .clusteringKey() - retrieve the previously defined clustering key.
  • .lookupKeys(...keys) - either an array of lookup keys or lookup keys passed as arguments that are collected into an array.
  • .lookupKeys() - retrieve the previously defined lookup keys.
  • .aliases() - retrieve the previously defined renamed properties.

FAQs

Package last updated on 10 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc